<template>
	<view class="content">
		<view class="uni-margin-wrap">
			<swiper class="swiper" circular :indicator-dots="swiperConfig.indicatorDots" :autoplay="swiperConfig.autoplay" :interval="swiperConfig.interval"
				:duration="swiperConfig.duration">
				<swiper-item>
					<view class="swiper-item uni-bg-red">
						<image class="logo" src="/static/logo.png"></image>
					</view>
				</swiper-item>
				<swiper-item>
					<view class="swiper-item uni-bg-green">
						<image class="logo" src="/static/logo.png"></image>
					</view>
				</swiper-item>
				<swiper-item>
					<view class="swiper-item uni-bg-blue">
						<image class="logo" src="/static/logo.png"></image>
					</view>
				</swiper-item>
			</swiper>
		</view>
		<view class="text-area">
			<text class="title">{{title}}</text>
		</view>
		<view></view>
	</view>
</template>

<script setup lang="ts">
	import { reactive, ref } from 'vue';
	let title = ref('我是uniapp')
	let swiperConfig = reactive({
		background: ['color1', 'color2', 'color3'],
		indicatorDots: true,
		autoplay: true,
		interval: 2000,
		duration: 500
	})
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
	
	/* swiper样式 */
	.uni-margin-wrap {
		width: 100%;
	}
	.swiper {
		height: 300rpx;
	}
	.swiper-item {
		display: block;
		height: 300rpx;
		line-height: 300rpx;
		text-align: center;
	}
	.swiper-list {
		margin-top: 40rpx;
		margin-bottom: 0;
	}
</style>